package game.module.user.logic;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import game.HallServer;
import game.module.user.bean.Activity_stateBean;
import game.module.user.dao.Activity_stateDao;

public class Activity_stateHelper {
	private static Logger logger = LoggerFactory.getLogger(Activity_stateHelper.class);
	
	static class SingletonHolder{
		static Activity_stateHelper instance = new Activity_stateHelper();
	}
	
	public static Activity_stateHelper getInstance() {
		return SingletonHolder.instance;
	}
	
	public void asyncAddActivity_state(final Activity_stateBean activitybena) {
		HallServer.executorService.execute(new Runnable() {
			
			@Override
			public void run() {
				// 添加用户的活动状态
				Activity_stateDao.getInstance().addActivity(activitybena);
			}
		});
	}
	public void asyncUpdateActivity_state(final Activity_stateBean activitybena) {
		HallServer.executorService.execute(new Runnable() {
			
			@Override
			public void run() {
				// 更新
				Activity_stateDao.getInstance().updateActivity(activitybena);
			}
		});
	}
}
